<style type="text/css">
#win_test_source_urls .set-test-num{padding:5px;padding-top:0;display:none;}
#win_test_source_urls .source_url{padding:5px;}
#win_test_source_urls p{margin:0;}
#win_test_source_urls ol{padding-left:15px;}
</style>
<div id="win_test_source_urls">
<div class="set-test-num">
	<b>多级页只测试前</b> <input type="number" value="" class="form-control input-sm set-num" style="display:inline;width:40px;height:20px;padding:1px 2px 1px 2px;" /> <b>条数据</b> 
	<button type="button" class="btn btn-default btn-xs set-num-btn">保存</button>
</div>

{if condition="empty($source_urls)"}
	没有起始页网址
{else /}
	{if condition="$config['source_is_url']"}
		<b>起始页已设置为内容页网址</b>
		{foreach $source_urls as $source=>$urls}
		<div class="source_url">
			<p>{$source}</p>
			<ul style="padding-left:15px;white-space:normal;">
			{if condition="empty($urls)"}
				<li>无</li>
			{elseif condition="is_array($urls)"}
				{foreach $urls as $url}
				<li>
					[<a href="javascript:;" class="cont_ceshi" url="{$url}">测试</a>]
					[<a href="javascript:;" class="cont_element" url="{$url}">分析</a>]
					{$url}
				</li>
				{/foreach}
			{else /}
				<li>
					[<a href="javascript:;" class="cont_ceshi" url="{$urls}">测试</a>]
					[<a href="javascript:;" class="cont_element" url="{$urls}">分析</a>]
					{$urls}
				</li>
			{/if}
			</ul>
		</div>
		{/foreach}
	{else /}
		{foreach name="source_urls" item="source_url"}
		<div class="source_url" url="{$source_url}">
			<p><b>抓取起始页面：</b>{$source_url}</p>
			<p class="cont_urls_num"></p>
			<div class="cont_urls_list">
			</div>
		</div>
		{/foreach}
	{/if}
{/if}
</div>

<script type="text/javascript">
'use strict';//严格模式

$.getScript("__PUBLIC__/static/js/admin/cpattern_test.js?{$Think.config.html_v}", function() {
	var cpTestSourceUrls=new CpTestSourceUrls("{$collData['id']}",{$testNum|intval},{$config['source_is_url']?1:0},{:empty($config['level_urls'])?0:1});
	$(document).ready(function(){
		cpTestSourceUrls.init();
	});
}); 
</script>